package myJs.tool

import upickle.default._

import scala.scalajs.js

/**
 * Created by yz on 24/4/2022
 */
object Pojo {

  trait SearchKind

  object TextSearch extends SearchKind

  object DateSearch extends SearchKind

  object NumericSearch extends SearchKind

  object DoubleSearch extends SearchKind

  object CheckboxSearch extends SearchKind

  trait SearchData

  case class TextSearchData(searchType: String, text: String) extends SearchData

  case class DateSearchData(startDate: String, endDate: String) extends SearchData

  case class NumericSearchData(min: String, max: String, kind: String) extends SearchData

  case class CheckboxSearchData(values: List[String]) extends SearchData

  case class SortData(field: String, order: String, kind: String)

  case class LeftItem(id: String, path: String, title: String, faClass: String)

  case class CompanyMember(account: String = "", password: String = "", companyName: String = "")

  case class SpecialMember(account: String = "", password: String = "")

  case class WorkflowData(name: String = "", status: String = "", folder: String = "")

  case class CSampleInfo(id: String, progress: String = "", workflow: List[WorkflowData])

  case class ExportData(text: String, href: js.UndefOr[String] = js.undefined,
                        onClick: js.UndefOr[() => Unit] = js.undefined)

}
